#define _CRT_SECURE_NO_WARNINGS 1
#include<stdio.h>
int factorial(int n) {
	if (n == 1) {
		return 1;
	}
	else {
		return factorial(n - 1) * n;
	}
}
//int main()
//{
	//int n = 0;
	//scanf("%d", &n);
	//int fact = 1;
	//for (int i = 1; i <= n; i++) {
		//fact *= i;
	//}
	//printf("%d", fact);
	//return 0;
//}
int main()
{
	int n = 0;
	scanf("%d", &n);
	int i=factorial(n);
	printf("%d", i);
	return 0;
}